package com.app.micaihu.bean.game;

import android.view.View;

import com.app.micaihu.R;
import com.app.micaihu.custom.view.CustomImageView;
import com.app.utils.util.ViewSizeUtils;
import com.app.utils.util.image.LoadImageUtils;

/**
 * 三张图
 * Created by linkai on 2017/3/14.
 */
public class ViewGameThreeImg extends ViewGameParent {

    private CustomImageView oneImageView;
    private CustomImageView twoImageView;
    private CustomImageView threeImageView;

    public ViewGameThreeImg(View convertView) {
        initView(convertView);
        convertView.setTag(this);
    }

    @Override
    protected void initView(View convertView) {
        super.initView(convertView);
        oneImageView = (CustomImageView) convertView.findViewById(R.id.item_image_0);
        twoImageView = (CustomImageView) convertView.findViewById(R.id.item_image_1);
        threeImageView = (CustomImageView) convertView.findViewById(R.id.item_image_2);
        ViewSizeUtils.changeViewAuto1080(this.oneImageView, 324, 232);
        ViewSizeUtils.changeViewAuto1080(this.twoImageView, 324, 232);
        ViewSizeUtils.changeViewAuto1080(this.threeImageView, 324, 232);

    }

    @Override
    public void loadData(GameRaidersEntity gameRaidersEntity) {
        super.loadData(gameRaidersEntity);
        LoadImageUtils.getInstance().loadImage(oneImageView, gameRaidersEntity.getArticleThumb().get(0));
        LoadImageUtils.getInstance().loadImage(twoImageView,gameRaidersEntity.getArticleThumb().get(1));
        LoadImageUtils.getInstance().loadImage(threeImageView,gameRaidersEntity.getArticleThumb().get(2));
    }
}
